function y = f2(x,n)

    sum = 1;

    for k = 1:n
        sum += (x^k)/factorial(k);
    end
        
    y = sum;

endfunction


